package com.hualan.service;

import com.hualan.domain.Courseproblem;
import com.hualan.mapper.CourseproblemMapper;
import com.hualan.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseproblemService {
    @Autowired
    private CourseproblemMapper courseproblemMapper;

    public R selectAllCourseProblemAndReply(int userId){
        List<Courseproblem> list = courseproblemMapper.selectAllCourseProblemAndReply(userId);
        if (list==null){
            return R.fail(200);
        }else {
            return R.success(list);
        }
    }
}
